/*
 * @(#)XfslEndActionListener.java        1.0 2000/05/09
 *
 * This file is part of Xfuzzy 3.0, a design environment for fuzzy logic
 * based systems.
 *
 * (c) 2000 IMSE-CNM. The authors may be contacted by the email address:
 *                    xfuzzy-team@imse.cnm.es
 *
 * Xfuzzy is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by
 * the Free Software Foundation.
 *
 * Xfuzzy is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * for more details.
 */

package xfuzzy.xfsl.view.listener;

import xfuzzy.xfsl.view.*;

import java.awt.event.*;

/**
 * Controlador de los botones del di�logo para seleccionar las 
 * condiciones de t�rmino del proceso de aprendizaje
 * 
 * @author Francisco Jos� Moreno Velo
 *
 */
public class XfslEndActionListener implements ActionListener {

	//----------------------------------------------------------------------------//
	//                            MIEMBROS PRIVADOS                               //
	//----------------------------------------------------------------------------//

	/**
	 * Di�logo de selecci�n de las condiciones de t�rmino
	 */
	private XfslEndDialog dialog;

	//----------------------------------------------------------------------------//
	//                                CONSTRUCTOR                                 //
	//----------------------------------------------------------------------------//

	/**
	 * Constructor
	 */
	public XfslEndActionListener(XfslEndDialog dialog) {
		this.dialog = dialog;
	}

	//----------------------------------------------------------------------------//
	//                             M�TODOS P�BLICOS                               //
	//----------------------------------------------------------------------------//

	/**
	 * Interfaz ActionListener
	 */
	public void actionPerformed(ActionEvent e) {
		String command = e.getActionCommand();
		if(command.equals("Set")) dialog.set();
		else if(command.equals("Unset")) dialog.unset();
		else if(command.equals("Cancel")) dialog.cancel();
	}
}

